<?php

namespace sample\controller;

use pmvc\mvc\Model;

/**
 *
 * @\pmvc\ioc\annotation\Object()
 * @\pmvc\mvc\annotation\Controller()
 */
class WhoController {

	/**
	 * @\pmvc\mvc\annotation\RequestMapping(url="/questions/who", method=self::GET)
	 */
	public function ask(Model $model) {
		$model->set("question", "Who are you?");
		return "questions/question.tmpl";
	}

	/**
	 * @\pmvc\mvc\annotation\RequestMapping(url="/questions/who", method=self::POST)
	 */
	public function respond($answer, Model $model) {
		$model->set("answer", $answer);
		return "questions/response.tmpl";
	}
}

?>
